package com.lagou.service.impl;

import com.lagou.entity.Token;
import com.lagou.service.api.UserService;
import com.lagou.service.biz.UserBizService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserBizService userBizService;

    @Override
    public String info(String token) {
        Token existedToken = userBizService.getToken(token);
        return existedToken != null ? existedToken.getEmail() : "";
    }

}
